﻿using System;

namespace IllusionUtility.GetUtility
{
	// Token: 0x02000636 RID: 1590
	public static class EnumExtensions
	{
		// Token: 0x060025FF RID: 9727 RVA: 0x0014652C File Offset: 0x0014472C
		public static bool HasFlag(this Enum self, Enum flag)
		{
			return self.AND(flag) == Convert.ToUInt64(flag);
		}

		// Token: 0x06002600 RID: 9728 RVA: 0x00146540 File Offset: 0x00144740
		public static ulong Add(this Enum self, Enum flag)
		{
			return self.OR(flag);
		}

		// Token: 0x06002601 RID: 9729 RVA: 0x0014654C File Offset: 0x0014474C
		public static ulong Sub(this Enum self, Enum flag)
		{
			return Convert.ToUInt64(self) & flag.NOT();
		}

		// Token: 0x06002602 RID: 9730 RVA: 0x0014655C File Offset: 0x0014475C
		public static ulong Get(this Enum self, Enum flag)
		{
			return self.AND(flag);
		}

		// Token: 0x06002603 RID: 9731 RVA: 0x00146568 File Offset: 0x00144768
		public static ulong Reverse(this Enum self, Enum flag)
		{
			return self.XOR(flag);
		}

		// Token: 0x06002604 RID: 9732 RVA: 0x00146574 File Offset: 0x00144774
		public static ulong NOT(this Enum self)
		{
			return ~Convert.ToUInt64(self);
		}

		// Token: 0x06002605 RID: 9733 RVA: 0x00146580 File Offset: 0x00144780
		public static ulong AND(this Enum self, Enum flag)
		{
			return Convert.ToUInt64(self) & Convert.ToUInt64(flag);
		}

		// Token: 0x06002606 RID: 9734 RVA: 0x00146590 File Offset: 0x00144790
		public static ulong OR(this Enum self, Enum flag)
		{
			return Convert.ToUInt64(self) | Convert.ToUInt64(flag);
		}

		// Token: 0x06002607 RID: 9735 RVA: 0x001465A0 File Offset: 0x001447A0
		public static ulong XOR(this Enum self, Enum flag)
		{
			return Convert.ToUInt64(self) ^ Convert.ToUInt64(flag);
		}
	}
}
